1. Field of the Invention
The present invention is related to a motion program executing apparatus of a motion control apparatus for performing a positioning control of an appliance to be controlled such as industrial machinery based upon a motion program, and also related to a motion program debugging apparatus.
2. Description of the Related Art
Conventionally, a motion program has been executed in accordance with a serial executing (serial processing) type system in which a program is basically and sequentially executed from an upper program portion to a lower program portion. As indicated in FIG. 11, when an instruction which is executed by a motion program 20 corresponds to an IO instruction, a command is issued to an IO executing unit 21, a response is confirmed, and thereafter, a next instruction is executed. Also, when an instruction which is executed by the motion program 20, a command is issued to a motion executing unit 22, a response is confirmed, and thereafter, a next instruction is executed. The motion program 20 is serially executed in accordance with the above-described program executing system.
For instance, in order to execute process operation explained in a flow chart of FIG. 3, such a motion program as shown in FIG. 12 is formed. As described in a program column (01) of the motion program shown in FIG. 12, for example, the motion program waits that an SW1 signal becomes ON by a GetIo function; when the SW1 signal is turned ON, the motion program issues such a command that an X axis is moved to a point “B” by a StartMove function of a program column (02); and when an execution of this command is completed, the motion program executes a program column (03). A process step (1) of FIG. 3 corresponds to the program column (01) of FIG. 12; a process step (2) of FIG. 3 corresponds to the program column (02) of FIG. 12; and a program step (3) of FIG. 3 corresponds to the program column (03) of FIG. 12. Also, a process step (4) of FIG. 3 corresponds to a program column (04) of FIG. 12; a process step (5) of FIG. 3 corresponds to a program column (06) of FIG. 12; and a program step (6) of FIG. 3 corresponds to a program column (12) of FIG. 12. Further, a process step (7) of FIG. 3 corresponds to a program column (13) of FIG. 12. FIG. 13 shows an execution timing diagram in the case that a signal SW2 is turned ON in this motion program.
Although such a motion control apparatus is not disclosed, Japanese Laid-open Patent Application No. Hei-8-63205 discloses the step trailing control technique capable of simultaneously executing a plurality of steps which are coupled to each other in the series manner when the program is executed. Referring now to a flowchart of FIG. 14, this step trailing control technique described in Japanese Laid-open Patent Application No. Hei-8-63205 will be explained. That is, the programmable controller for executing the SFC program is comprised of: the block executing means, the activate step information storage table, the step executing means, the transfer executing means, and the transfer holding step executing means. The block executing means controls/executes the entire blocks of the SFC program. The activate step information storage table stores thereinto the step NO. of the activate step of the activate block. The step executing means checks the step NO. stored in the activate step information storage table, and then, executes the operation output thereof. The transfer executing means executes the transfer condition to the active step. The transfer holding step executing means checks the step attribute when the transfer by the transfer executing means is established, and if the checked step attribute corresponds to the transfer holding step, then the transfer holding step executing means continuously executes the execution step even after the present step has been transferred to the next step without deleting the execution step, and also, successively initiates the transfer-dectination step since the subsequent transfers are established.
However, in the conventional system, as indicated in FIG. 13, while the motion program is executed, any one of the motion program, the IO executing unit, and the motion executing unit is necessarily executed, so that the execution efficiency of this motion program is extremely lowered. In a serial executing system, since executions of instructions may depend upon a sequence described in a computer program, an instruction execution sequence cannot be changed without changing the content of this program. Also, if an execution of one instruction is not completed, then a process operation is not advanced to a next instruction, so that instructions cannot be executed at the same time.
Also, in the step trailing control technique described in Japanese Laid-open No. Hei-8-63205, since the activate steps are detected in the constant time interval called as “scan time”, the CPU corresponding to the processing apparatus is required to execute the instructions without any rest time. At the same time, when the activate step is detected, there is such a problem that an overhead aspect may occur, depending upon the sequence of decoding/judging the activate steps within the scanning time period.